package com.isoft.hospital.controller;

import com.isoft.hospital.common.ResponseData;

import com.isoft.hospital.entity.Work;
import com.isoft.hospital.service.WorkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WorkController {
    @Autowired
    private WorkService service;
    @RequestMapping("/selectAllWork")
    public ResponseData selectAll(){
        ResponseData rd=service.selectAll();
        return rd;

    }
    @RequestMapping("/updatedework")
    public ResponseData update(Work work){
        ResponseData rd =service.update(work); //与service关联
        return rd;

    }
}
